package com.hmall.item.config;

import com.hmall.item.interceptor.JwtTokenItemInterceptor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置拦截器
 */
//@Component
//@Slf4j
//public class WebMvcConfiguration implements WebMvcConfigurer {
//    @Autowired
//    private JwtTokenItemInterceptor jwtTokenItemInterceptor;
//
//    /**
//     * 注册自定义拦截器
//     *
//     * @param registry
//     */
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        //注册用户端拦截器
//        registry.addInterceptor(jwtTokenItemInterceptor)
//                .addPathPatterns("/**")
//                .excludePathPatterns("/user/user/login")
//                .excludePathPatterns("/user/shop/status");
//    }
//}
